SmartFTP FTP Library
IFTPConnection::SetUnixPermissions Method

Sets the unix mode of a remote file or folder. 

The client sends a SITE CHMOD command. If the FTP command is not supported the function fails.

IDL
HRESULT SetUnixPermissions(
    [in] BSTR name, 
    [in] long nAttributes
);

The unix mode is typically found with octal representation. E.g. octal 0775.

C++, C#

SetUnixPermissions("myfile.pl", 0775); // note the 0 octal prefix

VB

SetUnixPermissions("myfile.pl", 509)

will both result in the following string sent to the server: 

"SITE CHMOD myfile.pl 755"

What do you think about this topic? Send feedback!
Copyright (c) by SmartSoft Ltd. All rights reserved.